package cn.com.fssg.platform.controller;

import cn.com.fssg.platform.base.handler.impl.pjqc.PjqcCount;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class TestController {

    @Autowired
    private PjqcCount pjlcStatusCtl;

    @PostMapping("/test")
    @ResponseBody
    public Object test(@RequestBody Map param) throws Exception {
        String jsonString = JSON.toJSONString(param);
        return pjlcStatusCtl.run(null, JSON.parseObject(jsonString));
    }
}
